'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp Jan 14 18:30
.ds Dm 01 colormask
.ds Xs 41408 4 colormask.gl
.TH GLCOLORMASK 3G
.SH NAME
.B "glColorMask
\- enable and disable writing of frame buffer color components

.SH C SPECIFICATION
void \f3glColorMask\fP(
GLboolean \fIred\fP,
.nf
.ta \w'\f3void \fPglColorMask( 'u
	GLboolean \fIgreen\fP,
	GLboolean \fIblue\fP,
	GLboolean \fIalpha\fP )
.fi

.SH PARAMETERS
.TP \w'\f2red\fP\ \f2green\fP\ \f2blue\fP\ \f2alpha\fP\ \ 'u 
\f2red\fP, \f2green\fP, \f2blue\fP, \f2alpha\fP
Specify whether red, green, blue, and alpha can or cannot be written
into the frame buffer.
The initial values are all \%\f3GL_TRUE\fP,
indicating that the color components can be written.
.SH DESCRIPTION
\%\f3glColorMask\fP specifies whether the individual color components in the frame buffer
can or cannot be written.
If \f2red\fP is \%\f3GL_FALSE\fP,
for example,
no change is made to the red component of any pixel in any of the
color buffers,
regardless of the drawing operation attempted.
.P
Changes to individual bits of components cannot be controlled.
Rather,
changes are either enabled or disabled for entire color components.
.SH ERRORS
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glColorMask\fP
is executed between the execution of \%\f3glBegin\fP
and the corresponding execution of \%\f3glEnd\fP.
.SH ASSOCIATED GETS
\%\f3glGet\fP with argument \%\f3GL_COLOR_WRITEMASK\fP
.br
\%\f3glGet\fP with argument \%\f3GL_RGBA_MODE\fP
.SH SEE ALSO
\%\f3glClear(3G)\fP,
\%\f3glColor(3G)\fP,
\%\f3glColorPointer(3G)\fP,
\%\f3glDepthMask(3G)\fP,
\%\f3glIndex(3G)\fP,
\%\f3glIndexPointer(3G)\fP,
\%\f3glIndexMask(3G)\fP,
\%\f3glStencilMask(3G)\fP
